package org.l.qiao;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @author 严秋旺
 * 
 */
public class Template extends Cluster {

	public static final String BASEDIR = "/WEB-INF/templates/html/";

	public final String[] Colms = { "_id", "description", "path", "created", "position", "default" };
	public final String ID = Colms[0];
	public final String Description = Colms[1];
	public final String Path = Colms[2];
	public final String Created = Colms[3];
	public final String Position = Colms[4];
	public final String Default = Colms[5];

	public Template() {
		super();
	}

	public Template(Map<String, Object> map) {
		super(map);
	}

	@SuppressWarnings("unchecked")
	public List<String> getPosition() {
		Object obj = this.get(Position);
		List<String> pt = null;
		if (obj == null) {
			pt = new ArrayList<String>();
		} else {
			try {
				pt = (List<String>) obj;
			} catch (Exception e) {
				pt = new ArrayList<String>();
			}
		}
		return pt;
	}
}
